package com.ssm.service.impl;

import java.sql.PseudoColumnUsage;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.ssm.dao.PersonMapper;
import com.ssm.dao.PositionMapper;
import com.ssm.pojo.Person;
import com.ssm.pojo.Position;
import com.ssm.service.PersonService;

@Service("PersonService")
public class PersonServiceImpl implements PersonService{

	  @Resource
	    private PersonMapper personDao;
	  
	/**
	 * 注册
	 */
	@Override
	public int insRegister(Person person) {
		// TODO Auto-generated method stub
		return this.personDao.insert(person);
	}
	@Override
	public Person selLogin(Person person) {
		
		return personDao.selectone(person);
	}
	
	@Override
	public int updateSelective(Person person) {
		return personDao.updateByPrimaryKeySelective(person);
	}
	@Override
	public Person selectbyid(int id) {
		// TODO Auto-generated method stub
		return personDao.selectByPrimaryKey(id);
	}


}
